Accord Software, Inc.

Server Stub



A function is needed to call the original function when a client makes a an IFC to a server. Such a function, for historical reasons, is known as a server stub.

A server stub function recreates the calling stack as well as any other data including pointers, and then calls the original function. It then returns the result of calling the original function back to the caller of the IFC.

For the add example, the server stub function would look like

	{
		int a;
		int b;
		int result;

		/*
	 	 * AccordSTAR libifc and add_xdr calls to 
		 * recreate the stack+data
	 	 */

		result = add(a, b);

		/*
	 	 * AccordSTAR libifc and add_xdr calls to 
		 * get results back to the caller 
	 	 */
	}
and would be placed in a file called add_serv.c.

AccordSTAR Generator normally compiles the gnerated server stub and then deletes the stub source code. For heterogeneous networking environment, you can pass in a flag which will cause it to generate source code only. The code can then be compiled as a separate step.

AccordSTAR generated code must not be modified in any way.


E-Mail:webmaster@accord.com
[P-017] Updated March 14, 1996
Copyright © 1993-1996 Accord Software, Inc. All rights reserved.